package main;
public class Timer {
	private static final long NANOS_IN_SEC = 1000 * 1000 * 1000;

	private long start;

	public void start() {
		start = System.nanoTime();
	}

	public long getNanos() {
		return System.nanoTime() - start;
	}

	public void printSeconds() {
		System.out.printf("Elapsed: %.3f seconds.\n", (double) getNanos()
				/ NANOS_IN_SEC);
	}
}
